<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>教师信息表管理</title>
	<meta name="decorator" content="default" />
	<script type="text/javascript">
        $(document).ready(function() {
            $("tr").click(function(){
                $(this).find("input[type='radio']").attr("checked",true);
            })
        });
        function page(n, s) {
            $("#pageNo").val(n);
            $("#pageSize").val(s);
            $("#searchForm").submit();
            return false;
        }
	</script>
</head>
<body>
<form:form id="searchForm" modelAttribute="teacher" action="${ctx}/business/teacher/select2/" method="post" class="breadcrumb form-search">
	<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}" />
	<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}" />
	<input id="type" name="type" type="hidden" value="${teacher.type}" />
	<label>名称  ：</label>
	<form:input path="name" htmlEscape="false" maxlength="50" class="input-medium" />
	<label>机构  ：</label>
	<tags:treeselect id="companyid" name="companyId" value="${teacher.companyId}" labelName="office.name" labelValue="${teacher.office.name}"
					 title="公司" url="/sys/office/treeData?type=1" cssClass="required" allowClear="true"/>
	&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit"value="查询" />
</form:form>
<tags:message content="${message}" />
<table id="contentTable" class="table table-striped table-bordered table-condensed">
	<thead>
	<tr>
			<th></th>
			<th>所属机构</th>
			<th>姓名</th>
			<th>教师电话</th>
			<th>教师状态</th>
			<th>教师类型</th>
			<th>微信名</th>
			<th>备注</th>
	</tr>
	</thead>
	<tbody>
	<c:forEach items="${page.list}" var="teacher">
		<tr>
			<td><input id="key" name="id" value="${teacher.id}" text="${teacher.name}" type="radio"></td>
			<td>${teacher.office.name}</td>
				<td>${teacher.name}</td>
				<td>${teacher.phone}</td>
				<td>${dic:getLabelByValue(teacher.status, 'tb_teacher_status')}</td>
				<td>${dic:getLabelByValue(teacher.type, 'tb_teacher_type')}</td>
				<td>${teacher.weChatUser.name}</td>
				<td>${teacher.remarks}</td>
		</tr>
	</c:forEach>
	</tbody>
</table>
<div class="pagination">${page}</div>
</body>
</html>